BUZZER INTERFACING WITH ARM
Buzzers are widely used in alarm devices, timers and confirmation of user input such as a mouse click or keystroke. It demonstrates the principle behind interfacing buzzer with ARM LPC2148 microcontroller.
Synopsis

A buzzer or beeper is an audio signal generator type device, which may be mechanical, electromechanical or piezoelectric depending upon the operating principle of the device. Buzzers are widely used in alarm devices, timers and confirmation of user input such as a mouse click or keystroke. It demonstrates the principle behind interfacing buzzer with ARM LPC2148 microcontroller. In embedded systems, buzzer is widely used to notify various events such as interrupt generation, end of any process or as an alarming on emergency situation such as detection of fire, exceeding radiation in nuclear reactor plant etc.

Description

ARM is one of the major options available for embedded system developer. LPC2148 is the widely used IC from ARM-7 family. It is manufactured by Philips and it is pre-loaded with many inbuilt peripherals making it more efficient and a reliable option for the beginners as well as high end application developer.  

ARM is a family of instruction set architectures for computer processors based on a reduced instruction set computing (RISC) architecture developed by British company ARM Holdings .A RISC-based computer design approach means ARM processors require significantly fewer transistors than typical processors in average computers. This approach reduces costs, heat and power use. These are desirable traits for light, portable, battery-powered devices including smartphones, laptops, tablet and notepad computers and other embedded systems. A simpler design facilitates more efficient multi-core CPUs and higher core counts at lower cost, providing higher processing power and improved energy efficiency for servers and supercomputers.


The ARM LPC2148 features are as follows:

1. Architecture: ARM v4T

2. Processor: ARM7-TDMI-S

3. Instructions: 32-bit ARM and 16-bit Thumb

4. Debug support: RT Embedded ICE, Embedded Trace interface

5. Static RAM: 32 KB

6. (On-chip)Additional: 8 KB for USB DMA

7. Flash Program: 512 KB

8. Mem.(On-chip)Programming: ISP/IAP via on-chip boot-loader program

9. GPIO No. of pins: up to 45 (fast GPIO lines, 5V tolerant), Configurable to fast GPIO

10. External Interrupts: Four; No. of pins: Nine

The ARM LPC2148 has two ports Port 0 and Port 1 respectively each port contains 32-bits for I/O operations. The Port 0 has 32-bit of I/O pins for individual directions and Port 1 has 32-bits of I/O pins for bidirectional purpose. It has two timers of each 32-bit. It has capable to storing 128-bit memory for interfacing.

Over the last few years, the ARM architecture has become the most pervasive 32-bitarchitecture in the world, with wide range of ICs available from various IC manufacturers. ARM processors are embedded in products ranging from cell/mobile phones to automotive braking systems. A worldwide community of ARM partners and third-party vendors has developed among semiconductor and product design companies, including hardware engineers, system designers, and software developers.

Buzzer is an electrical device, which is similar to a bell that makes a buzzing noise and is used for signaling. A piezoelectric element may be driven by an oscillating electronic circuit or other audio signal source, driven with a piezoelectric audio amplifier. Sounds commonly used to indicate that a button has been pressed are a click, a ring or a beep. When the input port pin from microcontroller is changed, the sound wave is changed in Buzzer.


A small piezoelectric buzzer on the ARM7 LPC2148 by pulling the pin low to which it is connected, current will flow through the buzzer and a relatively sharp, single-tone frequency will be heard. 

To design the driver circuit, we have following options.

1. Transistor as a switch

2. Use of audio amplifier in designing the driver


The types of Buzzers are as follows:

• Electromechanical

• Mechanical

• Piezoelectric

Applications

• Novelty uses

• Educational purposes

• Game show lock-out device

• Microwave ovens and other household appliances

• Electrical alarms

• Sporting such as basketball games events

• Judging panels

Proteus design for Buzzer interfacing with ARM


Orcad design for Buzzer interfacing with ARM


Buzzer interfacing with ARM

/*  Name     : main.c
 *  Purpose  : Source code for Buzzer Interfacing with ARM LPC1248.
 *  Author   : Gemicates
 *  Date     : 2018-08-01
 *  Website  : www.gemicates.org
 *  Revision : None
 */
#include<lpc21xx.h>			// header file for LPC21XX series
void delay(int time) 			// delay function declaration
{					// This function produces a delay in msec
int i,j;
for(i=0;i<time;i++)
{
for(j=0;j<i;j++);
}
}

int main() 				// main function
{
PINSEL0=0X00000000; 			// select PORT0 as GPIO mode
IO0DIR=0XFFFFFFFF; 			// make PORT0 pin as Output mode
while(1) 				// Repeat(loop) forever
{
IO0SET=0XFFFFFFFF; 			// Set the PORT0 pins
delay(100); 				// hault for sometime
IO0CLR=0XFFFFFFFF; 			// clear the PORT0 pins
}
return 0; 				// return back to main function
}
 

Error message here!

Show Error message here!


Forgot your password?

Error message here!

Send OTP

Error message here!

Show Error message here!


Lost your password? Please enter your email address. You will receive a password you Need.

Send Error message here!


Back to log-in

Close